<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<link href="style/bootstrap.min.css" rel="stylesheet">

		<style type="text/css">
body {
	padding-top: 70px;
}
</style>
	</head>

	<body>
		<div class="topbar" data-dropdown="dropdown">
			<div class="topbar-inner">
				<div class="container">
					<h3>
						<a href="#">an登录系统</a>
					</h3>
					<ul class="nav">
						<li class="active">
							<a href="#">主页</a>
						</li>
						<li>
							<a href="#">注册</a>
						</li>
						<li>
							<a href="#">帮助</a>
						</li>
					</ul>

					<ul class="nav secondary-nav">
						<li class="dropdown">
							<a class="dropdown-toggle" href="logout.jspx">${sessionScope.user.username
								}</a>
						</li>
					</ul>
				</div>
			</div>
		</div>



		<div class="container">
			<div class="well">
				<a class="btn large primary" href="toadd.jspx">添加商品</a>
				<a class="btn large primary" href="#">查询商品</a>
				<a class="btn large primary" href="statisticstimer.jspx">显示统计</a>
			</div>
			<div>
				<s:actionerror />
				<table class="bordered-table zebra-striped">
					<thead>
						<tr>
							<th class="yellow">
								产品名
							</th>
							<th style="width: 30%;" class="blue">
								单价
							</th>
							<th style="width: 10%;" class="green">
								操作
							</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${products }" var="product">
							<tr>
								<td>
									${product.productname }
								</td>
								<td>
									${product.price }
								</td>
								<td>
									<a href="toupdate.jspx?id=${product.id }">修改</a>
									<a href="delete.jspx?id=${product.getId() }">删除</a>
								</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
			</div>
		</div>


	</body>
</html>
